version=1.1

mvn clean package || exit

# 构建
docker build -t jetbrains_help:"$version" . || exit

# 上传
docker tag jetbrains_help:"$version" ccr.ccs.tencentyun.com/shaco_work/jetbrains_help:"$version"
docker push ccr.ccs.tencentyun.com/shaco_work/jetbrains_help:"$version"

docker tag jetbrains_help:"$version" ccr.ccs.tencentyun.com/shaco_work/jetbrains_help:latest
docker push ccr.ccs.tencentyun.com/shaco_work/jetbrains_help:latest

# 删除上传成功
docker rmi ccr.ccs.tencentyun.com/shaco_work/jetbrains_help:latest
docker rmi ccr.ccs.tencentyun.com/shaco_work/jetbrains_help:"$version"
